package com.boc.langxiang.entity.request;

import com.boc.langxiang.util.StringUtil;

/**
 * Created by Li Guoxi on 2016/7/6.
 */
public class SearchProductRequest extends MapParamsRequest {

    private final int pageSize = 6;
    private int page;
    private String keyword;
    private String ctype;

    @Override
    protected void putParams() {
        params.put("limit", String.valueOf(pageSize));
        params.put("page", String.valueOf(page));
        params.put("keyword", keyword);
        if (!StringUtil.isEmpty(ctype)) {
            params.put("ctype", ctype);
        }
    }

    public int getPageSize() {
        return pageSize;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public String getCtype() {
        return ctype;
    }

    public void setCtype(String ctype) {
        this.ctype = ctype;
    }
}
